'use strict';

angular.module('myApp.teach_plancontent', [])
.controller('teach_plancontentCtrl', ['$scope','$routeParams','$http','breadcrumbData',function($scope,$routeParams,$http,$breadcrumbData) {
	
	$scope.classe = $routeParams;

   
    $http.get('v1/classes').success(function(data){
        $scope.nodel = data.result['data'];
        console.log(data.result['data']);
    });

	$scope.search = function(n){
		$http.get('v1/classes/'+n+'/teach_plan').success(function(data){
	        $scope.teachplans = data.result;
	        console.log(data.result);
   		 });
	};

//查找分类
    $http.get('v1/teach_content_cat').success(function(data){
        $scope.cats = data.result;
        console.log(data.result);
    });
//知识点
    // $http.get('v1/teach_content_cat/'+ cat.id+'/teach_content').success(function(data){
    //     $scope.contents = data.result;
    //     console.log(data);
    // });
    $scope.add = function(teachplan){
        $scope.planid= teachplan.id;
    };
    $scope.addplan = function(cat,planid){
        // console.log(cat.id);
        console.log(planid);
    };

}]);